package com.dragon.modules.yuegou.service.product;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.dragon.common.web.PageRequest;
import com.dragon.modules.yuegou.entity.product.CoupApplyEntity;
import com.dragon.modules.yuegou.model.product.ApplyCouponListModel;
import com.dragon.modules.yuegou.model.product.CoupApply;
import com.dragon.modules.yuegou.request.ApplyCouponListRequest;

import java.time.LocalDate;
import java.util.List;

/**
 * 商品券申请表 服务接口
 *
 * @author pbuilder generated
 * @date 2021-05-11 16:55:17
 * @version 2.0
 */
public interface CoupApplyService extends IService<CoupApplyEntity> {

    /****
     * 商品券、运营活动优惠券申请分页查询
     * @param page 分页查询条件
     * @param listRequest   查询条件
     * @return
     */
    IPage<ApplyCouponListModel> listPage(PageRequest page, ApplyCouponListRequest listRequest);

    List<ApplyCouponListModel> recordList(ApplyCouponListRequest listRequest);

    String apply(CoupApply apply);

    void cancel(String applyId);

    void submitCheck(String applyId);

    void changeReleased(String applyId, int num);

    /***
     * 定时任务处理失效商品券
     * @param date
     */
    void invalidationProCoupon(LocalDate date);
}